/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {
    // 使用post请求
    security:{
      csrf: false  //关掉csrf 拦截  post请求
    },
    middleware:["auth"],
    // 配置mysql
    mysql:{
      client:{
        host:"localhost",
        port:3306,
        user:"root",
        password:"123456",
        database:"db_login"
      }
    }
  };

  // // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1642408729248_2429';
  // // add your middleware config here
  // config.middleware = [];

  // // add your user config here
  // const userConfig = {
  //   // myAppName: 'egg',
  // };

  return {
    ...config,
    // ...userConfig,
  };
};
